#include <iostream>

using namespace std;

int fun(int &a,int &b){
    int tem =a;
    a = b;
    b = tem;
    return 0;
}
int main(int argc, char const *argv[])
{
    int a = 1;
    int b = 2;
    cout<<"交换前a:"<<a<<endl;
    cout<<"交换前b:"<<b<<endl;
    fun(a,b);
    cout<<"交换后a:"<<a<<endl;
    cout<<"交换后b:"<<b<<endl;
    return 0;
}
